1. Field of the Invention
The present invention relates to an image processing apparatus and method in which a digitized image is partitioned into areas.
2. Description of the Related Art
A digitized image comprises a plurality of picture elements (pixels) having digital pixel values. Digitized images can be processed in many useful ways. For example, an image captured by a digital camera can be processed to make subject areas stand out from the background. For this and many other purposes, it is necessary to identify the subject and background areas. The simplest method is to display the image on a computer screen and have the computer user trace the precise outline of each subject area with a pointing device such as a mouse, but this is an exacting and difficult task, especially when the outline has a complex shape.
Alternative methods described in Japanese Unexamined Patent Application Publication No. H10-187936, for example, allow the user to designate a rough outline around each subject area, and have the computer itself remove background areas from inside the outline, leaving only the desired subject area. As a first step, the computer partitions the image, or the part of the image inside the outline, into areas in which mutually adjacent pixels have similar pixel values. In one method, the computer then removes relatively large areas from within the outline. In another method, the computer weights each pixel in the image according to its distance from the user-designated outline, totals the weights in each area to obtain an area weight, classifies the areas as subject or background according to their weights, and repeats this process with different user-designated outlines until the user is satisfied with the result.
A problem with these rough-outline methods is that even drawing a rough outline with a pointing device such as a mouse is a troublesome procedure, especially if the procedure has to be repeated.
A further problem is that in dividing the image into areas, these methods compare the difference between adjacent pixel values with a fixed threshold. When the background area has a gradation of pixel values, for example, it therefore tends to become unnecessarily divided into a plurality of sub-areas, which makes it difficult to discriminate between background and subject areas, and complicates further processing of the background area itself.